from django.urls import path
from . import views
from django.conf import settings
from django.conf.urls.static import static



app_name = 'shangpinadmin'
urlpatterns = [
    #登录界面
    path('',views.login,name = 'login'),
    #商户添加商品
    path('addgoods',views.add_goods,name = 'add_goods'),
    #管理员为商户开账号
    path('register/merchants',views.register_merchants,name = 'register_merchants'),
    #商户页面的商品展示
    path('goods/show<int:user_id>',views.merchants_goods_show,name = 'goods_show'),
    #分类调用的api
    path('class_api',views.class_api,name = 'class_api'),
    #设置商品字段
    path('set_goods/<int:goods_id>',views.set_goods,name = 'set_goods'),
    #设置商品详细
    path('goods_detailed/<int:goods_id>',views.goods_detailed,name = 'goods_detailed'),

] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
